/*************************************
* Copyright 2016 elementary LLC.     *
* This file is part of elementary.io *
*************************************/

/******************
* Responsive Hero *
******************/

#amounts h4 {
    display: inline-block;
}

#choice-buttons {
    display: inline-flex;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 575px) {
    #choice-buttons {
        margin: 0 24px;
    }
}

.payment-button::before {
    content: "$";
    float: left;
    font-size: 14px;
    margin-left: -3px;
    margin-right: 3px;
}

.pre-amount {
    color: #333;
    font-size: 14px;
    margin-left: 14px;
    margin-right: -21px;
    margin-top: 0.8em;
    pointer-events: none;
    position: absolute;
}

#amount-custom {
    padding-left: 24px;
    padding-right: 24px;
    text-align: center;
    width: calc(100% - 6px); /* Work around payent-button::before */
}

.focus-reveal {
    margin: 0 3px;
    opacity: 0 !important;
    transition: 250ms all;
    width: 190px;
}

input:focus + .focus-reveal {
    opacity: 0.8 !important;
    transition: 250ms all;
}

#download {
    margin: 3px auto 6px;
}

#the-press h4 {
    font-size: 24px;
    opacity: 0.65;
}

#the-press svg {
    display: block;
    height: 27px;
    margin: 19px auto;
    opacity: 0.8;
    transition: opacity 250ms ease-in-out;
}

#the-press svg:hover {
    opacity: 1;
}

#the-press svg:active {
    position: relative;
    top: 1px;
}

/***********
* Sections *
***********/

.section--hero {
    display: flex;
    flex-direction: column;
}

.section--hero .section__detail {
    flex: 0 0 auto;
    max-width: 100%;
    padding: 0 0 16px;
}

.section--hero .section__showcase {
    background-image: url("../images/responsive-images/notebook-small.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex: 1 1 auto;
    margin-bottom: -32px;
    min-height: 50vh;
}

@media all and (min-width: 500px) {
    .section--hero .section__showcase {
        background-image: url("../images/responsive-images/notebook-medium.jpg");
    }
}

@media all and (min-width: 1000px) {
    .section--hero .section__showcase {
        background-image: url("../images/responsive-images/notebook-large.jpg");
    }
}

@media all and (min-width: 1300px) {
    .section--hero .section__showcase {
        background-image: url("../images/responsive-images/notebook.jpg");
    }
}

@media (min-aspect-ratio: 1/2) and (min-height: 800px) and (max-height: 2000px) {
    .section--stretched {
        height: calc(100vh - 56px);
    }

    .section--stretched > .section__showcase {
        display: flex;
    }
}

/***********************
* app display sections *
***********************/

.app-display {
    align-content: center;
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
}

.app-display__description {
    max-width: 600px;
    padding: 0 32px;
}

@media (min-width: 1000px) {
    .app-display__image {
        order: 2;
    }

    .app-display.app-display--horizontal,
    .app-display.app-display--overflow {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .app-display--overflow .app-display__image {
        flex: 0 0 auto;
        order: 2;
        overflow: visible;
    }

    .app-display--overflow .app-display__description {
        flex: 1 0 auto;
        padding: 0 0 0 64px;
    }
}

/*********************************
* showcase layout and index grid *
*********************************/

#showcase {
    display: block;
    max-width: none;
    overflow: hidden;
    padding: 0;
}

#showcase > div {
    display: block;
    margin: auto;
    width: 100%;
    padding: 0 24px;
}

#showcase p {
    margin: auto;
    max-width: 600px;
}

#showcase #showcase-index {
    padding: 48px 0;
}

#showcase #showcase-index > div {
    padding: 0 28px;
}

#showcase #showcase-grid {
    list-style: none;
    margin: auto;
    max-width: 800px;
    padding: 0;
    text-align: center;
}

#showcase #showcase-grid li {
    display: inline-block;
    margin: 16px;
    padding: 0;
}

@media (min-width: 320px) {
    #showcase #showcase-grid li {
        margin: 26px;
    }
}

@media (min-width: 425px) {
    #showcase #showcase-grid li {
        margin: 32px;
    }
}

#showcase #showcase-grid img {
    display: block;
    width: 64px;
    margin: 12px;
}

#showcase #showcase-grid a {
    color: inherit;
}

/********************
* showcase programs *
********************/

#showcase .showcase-tab .app-display {
    flex-direction: column;
}

#showcase .showcase-tab .app-display__description {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 0 16px;
}

#showcase .showcase-tab .app-display__description > * {
    padding: 8px;
    text-align: left;
}

#showcase .showcase-tab .app-display__description > img {
    height: 80px;
    width: 80px;
}

@media (min-width: 1000px) {
    #showcase .showcase-tab .app-display__description {
        flex-wrap: nowrap;
        padding-bottom: 0;
    }
}

/***********************
* initialized showcase *
***********************/

#showcase.initialized > div.showcase-tab > .showcase-back {
    background-image: url("../images/back-arrow.svg");
    background-position: 50%;
    background-repeat: no-repeat;
    cursor: pointer;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 64px;
}

#showcase.initialized {
    position: relative;
    transition: height 0.25s ease-in-out;
}

#showcase.initialized > div {
    position: absolute;
    top: 0;
    transition: transform 0.25s ease-in-out;
    width: 100%;
    will-change: transform;
}

#showcase.initialized > div#showcase-index {
    left: -100%;
    padding: 48px 0;
}

#showcase.initialized > div#showcase-index.active {
    transform: translate3d(100%, 0, 0);
}

#showcase.initialized > div.showcase-tab {
    left: 100%;
    padding: 32px 24px 32px 64px;
}

#showcase.initialized > div.showcase-tab.active {
    transform: translate3d(-100%, 0, 0);
}

/*******************
* Pantheon windows *
*******************/

#showcase > .pantheon:first-of-type {
    z-index: 99;
}

#showcase .pantheon .window[type="terminal"] {
    height: 36vw;
    max-height: 600px;
    max-width: 800px;
    width: 58vw;
    margin: 32px 32px 64px;
}

/************
* AppCenter *
************/

#appcenter {
    display: flex;
    justify-content: center;
    padding: 48px 0;
}

#appcenter .app-display {
    max-width: 1300px;
    overflow: visible;
    transition: all 0.2s ease-in-out;
}

@media (min-width: 2000px) {
    #appcenter .app-display {
        max-width: 100%;
    }
}

#appcenter .app-display__description img {
    display: block;
    height: 64px;
    margin: 0 auto 16px;
    width: 64px;
}

@media (min-width: 400px) {
    #appcenter .app-display__description img {
        height: 128px;
        margin: 0 auto 32px;
        width: 128px;
    }
}

/************
* Slingshot *
************/

#slingshot {
    display: flex;
    justify-content: center;
    padding: 64px 0;
    width: 100%;
}

#slingshot .app-display__image {
    padding: 0 32px 32px;
}

@media (min-width: 1000px) {
    #slingshot .app-display__image {
        order: 0;
    }
}

#slingshot .app-display__description svg {
    display: inline-block;
    float: left;
    margin: 4px 6px 4px 0;
}

#slingshot .app-display__description svg,
#slingshot .app-display__description svg * {
    color: #000 !important;
    fill: #000 !important;
}

#slingshot .app-display__description p {
    margin-left: 24px;
}

@media (min-width: 330px) {
    #slingshot .app-display__description h2 {
        margin-left: 24px;
    }
}

.symbolic {
    fill: #333;
}

.slingshot {
    background-clip: padding-box;
    background-color: #f5f5f5;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.15),
        0 3px 6px -3px rgba(0, 0, 0, 0.25);
    display: inline-block;
    height: 512px;
    padding: 12px;
    pointer-events: none;
    transition: all 200ms ease-out;
    width: 678px;
}

#slingshot-arrow {
    height: 20px;
    left: 12px;
    position: relative;
    top: 5px;
    width: 30px;
    z-index: 100;
}

#slingshot-label {
    font-weight: 700;
    font-size: 12px;
    opacity: 0.8;
    text-align: left;
    margin-left: 3px;
}

.slingshot .linked {
    display: inline-block;
    margin: 0;
    transition: all 200ms ease-out;
}

.slingshot .linked,
.slingshot .linked * {
    color: #000 !important;
    fill: #000 !important;
}

.slingshot .linked.inactive {
    margin-left: -73px;
}

.slingshot .button {
    background-image: none;
    fill: #333;
    width: 30px;
}

.slingshot .entry {
    background-image: linear-gradient(to bottom, #f0f0f0, #f5f5f5);
    border: 1px solid rgba(61, 155, 218, 0.8);
    border-radius: 2.5px;
    box-shadow:
        inset 0 0 0 1px rgba(61, 155, 218, 0.23),
        0 1px 0 0 rgba(255, 255, 255, 0.3);
    color: #333;
    display: inline-block;
    fill: #a6a6a6;
    margin-left: 8px;
    text-align: left;
    text-shadow: 0 1px rgba(255, 255, 255, 0.4);
    transition: all 200ms ease-out;
    width: 579px;
}

.slingshot .entry.expanded {
    width: 100%;
}

.entry .symbolic {
    fill: #333;
    opacity: 0.4;
}

.slingshot .button,
.slingshot .entry {
    height: 25px;
    padding: 3px 6px;
}

#slingshot-grid .slingshot-grid {
    margin-left: 12px;
}

.app {
    display: inline-block;
    float: left;
    height: 116px;
    margin: 0;
    margin-top: 27px;
    width: 130px;
}

.app img {
    display: block;
    height: 64px;
    margin: auto;
    width: 64px;
}

.app p {
    font-family: "Open Sans", Helvetica, sans-serif;
    font-size: 9pt;
    margin-top: 6px;
    text-align: center;
}

#slingshot-pager {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
    margin-top: 9px;
    width: 100%;
}

#slingshot-pager .button {
    font-family: "Open Sans", Helvetica, sans-serif;
    font-size: 9pt;
    height: 23px;
    line-height: 16px;
    margin: 2px;
}

/*************
* Categories *
*************/

.slingshot-categories-sidebar {
    border-right: 1px solid #d0d0d0;
    display: block;
    float: left;
    height: 456px;
    margin-top: 16px;
    transition: all 200ms ease-out;
    width: 124px;
}

.slingshot-category {
    color: #717171;
    display: block;
    font-family: "Open Sans", Helvetica, sans-serif;
    font-size: 9pt;
    line-height: 9pt;
    padding: 7px 12px 6px 16px;
    text-align: left;
    text-shadow: 0 1px rgba(255, 255, 255, 0.4);
    word-break: break-word;
}

.slingshot-category.active {
    background-image: linear-gradient(to bottom, #dbdbdb, #e3e3e3);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 0 rgba(0, 0, 0, 0.05),
        inset 0 2px 0 0 rgba(0, 0, 0, 0.05),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.05);
    color: #717171;
}

.slingshot-categories {
    margin-left: 127px;
    padding-top: 12px;
}

.slingshot .search-entry {
    margin: 0 auto;
    width: 653px;
}

/*********
* Search *
*********/

.clear-icon {
    float: right;
}

.clear-icon.inactive {
    display: none;
}

img.result-img {
    display: inline-block;
    height: 32px;
    margin-right: 12px;
    width: 32px;
}

.searchone,
.searchtwo,
.searchthree {
    display: none;
}

.searchone.active,
.searchtwo.active,
.searchthree.active {
    display: block;
}

.slingshot-search-results {
    color: #333;
    display: block;
    float: left;
    font-family: "Open Sans", Helvetica, sans-serif;
    font-size: 9pt;
    line-height: 9pt;
    margin: 6px 0;
    text-align: left;
    text-shadow: none;
    width: 100%;
}

span.search-term,
span.cursor {
    color: #333;
    display: inline-block;
    font-family: "Open Sans", Helvetica, sans-serif;
    font-size: 9pt;
    height: 16px;
    position: relative;
    text-shadow: none;
}

span.search-term {
    line-height: 19px;
    margin-right: -8px;
    overflow: hidden;
    transition: all 1.5s steps(3, start);
    width: 19px;
    vertical-align: top;
}

span.search-term.inactive {
    transition: none;
    width: 0;
}

span.cursor {
    animation: blink 1.2s steps(5, start) infinite;
    font-size: 12pt;
    line-height: 18px;
    top: -4px;
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

span.results-title {
    color: #707070;
    display: block;
    font-family: "Open Sans", Helvetica, sans-serif;
    font-size: 9pt;
    font-weight: bold;
    line-height: 9pt;
    margin: 18px 8px 6px;
    text-align: left;
    text-shadow: 0 1px rgba(255, 255, 255, 0.4);
}

.search-result {
    display: block;
    padding: 4px 16px;
}

.slingshot-search-results:first-of-type .search-result:first-child {
    background-color: #c4c4c4;
}

.search-result > * {
    display: inline-block;
    vertical-align: middle;
}

/**********
* Animate *
**********/

.slingshot {
    overflow: hidden;
    position: relative;
}

.slingshot .view {
    bottom: -37px;
    height: 100%;
    left: 0;
    max-width: 680px;
    position: absolute;
    transition: all 200ms ease-in-out;
    width: 100%;
}

.slingshot .view.previous {
    filter: alpha(opacity=0);
    opacity: 0;
    transform: translateX(-110%);
}

.slingshot .view.active {
    filter: alpha(opacity=100);
    opacity: 1;
    transform: translateX(0%);
}

.slingshot .view.next {
    filter: alpha(opacity=0);
    opacity: 0;
    transform: translateX(110%);
}

#slingshot-categories.active {
    transform: translateX(0%);
}

@media (max-width: 1400px) {
    .slingshot {
        height: 369px;
        width: 424px;
    }

    .slingshot .entry {
        width: 325px;
    }

    .app.last-row,
    .app.middle-row {
        display: none;
    }

    .slingshot-arrow {
        top: -346px;
    }

    .slingshot-categories-sidebar {
        height: 313px;
    }

    #slingshot-categories {
        margin-top: -312px;
    }
}

@media (max-width: 581px) {
    .slingshot {
        height: 269px;
        width: 272px;
    }

    .slingshot .entry {
        width: 173px;
    }

    .app {
        height: 70px;
        margin-top: 27px;
        width: 82px;
    }

    .app img {
        height: 32px;
        width: 32px;
    }

    .slingshot-categories-sidebar {
        width: 104px;
    }

    #slingshot h2 {
        margin-top: 24px;
    }
}
